package com.scs.application.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 耗材单位
 * </p>
 */
@Data
@Accessors(chain = true)
@TableName("base_matr_unit")
@EntityClassAnnotation(remark = "耗材单位表")
@EntityIndexAnnotation(ix = {"unit", "matr_id"})
public class MatrUnit extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "物料ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String unit;

    @EntityFieldAnnotation(
            text = "价格",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double price;

    @EntityFieldAnnotation(
            text = "相对于基准单位的数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = "比率"
    )
    private Double rate;

    @EntityFieldAnnotation(
            text = "是否基准单位，同一个品规下只能有一个基准单位",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否基准单位"
    )
    private Boolean flagBase;

    @EntityFieldAnnotation(
            text = "采购单位标志",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否采购单位"
    )
    private Boolean flagPurchase;

    @EntityFieldAnnotation(
            text = "请领/配送单位标志/请领/配送单位",
            length = "",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagApply;

    @EntityFieldAnnotation(
            text = "是否禁用单位",
            length = "",
            not_null = true,
            default_value = "0",
            comment = "是否禁用单位"
    )
    private Boolean flagDisabled;


    @EntityFieldAnnotation(
            text = "是否隐藏",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "是否隐藏（隐藏后模块操作时不可见）"
    )
    private Boolean flagHide;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

}
